	<?php
		$iProfile=empty($_POST["iProfile"])?"":$_POST["iProfile"];
		$iTrader=empty($_POST["iTrader"])?"":$_POST["iTrader"];
		$response=empty($_POST["response"])?"":$_POST["response"];
		//insert value
		$conn = mysqli_connect("earth.cs.utep.edu","wb_epadilla2","123456abc");
		$conn->select_db("wb_epadilla2");  

		if ($response == "accepted")
		{
			$command = "UPDATE tTraders SET dAccepted=CURDATE() WHERE iTrader=$iTrader;";
		}
		elseif ($response == "rejected")
		{
			$command = "DELETE FROM tTraders WHERE iTrader=$iTrader;";
		}
		$conn->query($command);
		$conn->close();
		
		include('FriendRequestsRetrieve.php');
?>	